#!/bin/bash

# path=/home/cat/Downloads/shop_pictures/
path=/home/cat/Downloads/shopLogos/

shops=`ls ${path}`

# 修改目录名
i=1
for shop in ${shops}
do
    echo $shop
    mv "${path}${shop}" "${path}${i}"
    i=$((i + 1))
done

# 修改文件名
# j=1
# for shop in ${shops}
# do
    # for product in `ls ${path}${shop}`
    # do
        # echo $product
        # mv "${path}${shop}/${product}" "${path}${shop}/${shop}_${j}.webp"
        # j=$((j + 1))
    # done
# done
